package com.ds.config;


import org.aspectj.lang.annotation.*;
import org.springframework.stereotype.Component;

/**
 * @program: SpringBoot
 * @description:
 * @author: Dawson.Zhang
 * @create: 2020-04-13
 **/
@Aspect
@Component
public class AopConfig {

    @Before(value = "execution(* com.ds.controller.*.*(..))")
    public void before(){
        System.out.println("前置通知");
    }
    @After(value = "execution(* com.ds.controller.*.*(..))")
    public void after(){
        System.out.println("后置通知");
    }
//    @Around(value = "execution(* com.ds.controller.*.*(..))")
//    public void around(){
//        System.out.println("环绕通知");
//    }
    @AfterReturning(value = "execution(* com.ds.controller.*.*(..))")
    public void afterReturn(){
        System.out.println("返回通知");
    }
}
